#-- gtest
GTEST_HOME_PATH		:= /home/chenglun/third/gtest
GTEST_INC_PATH		:= $(GTEST_HOME_PATH)/
GTEST_LIB_PATH		:= $(GTEST_HOME_PATH)/gtest
GTEST_LIB_NAME		:= gtest_main
GTEST_LIB_FULL_NAME	:= $(GTEST_LIB_PATH)/$(GTEST_LIB_NAME).a

CXXFLAGS 	:= #$(addprefix -I, $(GTEST_INC_PATH))
CXXFLAGS 	+= -std=c++11 -g -Werror -Wall
LOADLIBES   := #$(addprefix -L, $(GTEST_LIB_PATH))

LDLIBS      := #$(addprefix -l, $(GTEST_LIB_NAME))
LDLIBS      += #-lpthread


OBJS = $(patsubst %.cpp,%.o, $(wildcard *.cpp))

TARGET=main

all: $(TARGET)

$(TARGET):$(OBJS)
	$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@

clean:
	rm -frv $(TARGET) $(OBJS)


.o: %.cpp
	$(COMPILE.cpp) $(OUTPUT_OPTION) $<

